<script setup>
import diseasePannel from "./components/diseasePannel.vue";
// 我们的机型顶部区域适配
const { safeAreaInsets } = uni.getSystemInfoSync();
</script>

<template>
  <!-- 头部导航栏开始 -->
  <view class="navbar" :style="{ paddingTop: safeAreaInsets?.top + 'px' }">
    <!-- logo文字 -->
    <view class="logo">
      <!-- 首页字样 -->
      <view>
        <text class="home">病害诊断</text>
      </view>
    </view>
  </view>
  <!-- 头部导航栏结束 -->

  <!-- 病害顶部图片开始-->
  <view class="disease_banner">
    <image
      src="../../static/images/disease_core_banner.webp"
      mode="scaleToFill"
    />
  </view>
  <!--病害顶部图片结束  -->
  <!-- 作物类型开始 -->
  <view class="crop_type">
    <text style="letter-spacing: 4rpx">作物类型：玉米</text>
  </view>
  <!-- 作物类型结束 -->

  <!-- 疑似病害开始 -->
  <view class="suspious_disease">
    <text class="suspious_title">疑似病害</text>
    <view class="disease_img">
      <image src="../../static/images/confirm_disease.png" mode="scaleToFill" />
    </view>

    <!-- 病害描述 -->
    <view class="disease_descs">
      <view class="title">玉米粗缩病</view>
      <text class="desc_word"
        >玉米粗缩病是由玉米粗缩病毒引起的、发生在玉米的病害。主要为害叶片、叶鞘、苞叶、根和茎部等，玉米生长的整个阶段都可能发生玉米粗缩病</text
      >
    </view>

    <view class="confirm">
      <view class="show_dail">查看详情</view>
      <view class="confims">已确诊</view>
    </view>
  </view>
  <!-- 疑似病害结束 -->
  <view class="kind">病害种类</view>
  <!-- 病害种类开始 -->
  <diseasePannel title="玉米大斑病">
    <view class="recommend_container">
      <!-- 上图片下文字 -->
      <view class="show_img">
        <image
          src="../../static/images/disease_kind1.webp"
          mode="scaleToFill"
        />
      </view>
      <!-- 文字描述 -->
      <view class="agriculture_desc">
        <view class="desc_item">
          <text class="descs">描述：</text>
          <text class="desc"
            >玉米大斑病是由大斑病凸脐蠕孢引起的、发生在玉米的病害。主要危害叶片，严重时也危害叶鞘和苞叶，一般先从底部叶片开始发生逐步向上扩展，严重时能遍及全株。</text
          >
        </view>
        <view class="desc_item">
          <text class="descs">防止建议：</text>
          <text class="desc"
            >农业防治：积极推广抗病品种。 化学防治：根据病情，先摘除植株基部
            黄叶、病叶，减少再次侵染菌源， 增强通风透光度然后喷施杀菌剂。</text
          >
        </view>
      </view>
    </view>
  </diseasePannel>

  <diseasePannel title="玉米条纹矮缩病">
    <view class="recommend_container">
      <!-- 上图片下文字 -->
      <view class="show_img">
        <image
          src="../../static/images/disease_kind2.webp"
          mode="scaleToFill"
        />
      </view>
      <!-- 文字描述 -->
      <view class="agriculture_desc">
        <view class="desc_item">
          <text class="descs">描述：</text>
          <text class="desc"
            >病株节间缩短，植株矮缩，沿叶脉产生褪绿条纹，后条纹上产生坏死褐斑。植株早期受害，生长停滞，提早枯死。</text
          >
        </view>
        <view class="desc_item">
          <text class="descs">防止建议：</text>
          <text class="desc"
            >农加强田间管理，适时播种。把好玉米第
            一次浇灌时间，争取在玉米出苗后40～ 45天浇头水。</text
          >
        </view>
      </view>
    </view>
  </diseasePannel>

  <diseasePannel title="玉米红斑病">
    <view class="recommend_container">
      <!-- 上图片下文字 -->
      <view class="show_img">
        <image
          src="../../static/images/disease_kind3.webp"
          mode="scaleToFill"
        />
      </view>
      <!-- 文字描述 -->
      <view class="agriculture_desc">
        <view class="desc_item">
          <text class="descs">描述：</text>
          <text class="desc"
            >从下部第四、第五叶片开始，向上逐渐发病。叶片多由叶尖沿叶缘向基部变紫红色(个别品种变金黄色)，病叶光亮，质地略硬。</text
          >
        </view>
        <view class="desc_item">
          <text class="descs">防止建议：</text>
          <text class="desc"
            >在发病地区不种植高度感病的玉米品种
            ，搞好麦田黄矮病和麦蚜的防治，减少 侵染玉米的毒源和介体蚜虫。</text
          >
        </view>
      </view>
    </view>
  </diseasePannel>
  <!-- 病害种类结束 -->
</template>

<style lang="scss">
page {
  background-color: #f7f7f7;
  height: 10000px;
}
.scroll-view {
  position: absolute;
  top: 241rpx;
}
/* 自定义导航条开始 */
.navbar {
  position: fixed !important;
  top: 0 !important;
  z-index: 9999;
  width: 100%;
  background-color: #4dc58e;
  background-size: cover;
  position: relative;
  display: flex;
  flex-direction: column;
  padding-top: 20px;
  height: 130rpx;
  .logo {
    display: flex;
    align-items: center;
    height: 64rpx;
    padding-left: 30rpx;
    padding-top: 20rpx;
    // .left_arrow {
    //   position: absolute;
    //   top: 120rpx;
    //   left: 30rpx;
    //   width: 35rpx;
    //   height: 35rpx;
    //   // background: url("../../../src/static/images/left_arrow.png") no-repeat;
    //   background-size: cover;
    // }
    .logo-image {
      width: 166rpx;
      height: 39rpx;
    }
    .logo-text {
      // flex: 1;
      line-height: 28rpx;
      color: #fff;
      font-family: "华文新魏";
      font-size: 50rpx;
    }
    .home {
      margin-left: 280rpx;
      color: #fff;
      font-weight: bold;
    }
  }
  .search {
    position: relative;
    display: flex;
    align-items: center;
    // justify-content: space-between;
    padding: 0 10rpx 0 26rpx;
    height: 64rpx;
    margin: 16rpx 20rpx;
    color: #fff;
    font-size: 28rpx;
    border-radius: 32rpx;
    background-color: rgba(255, 255, 255, 0.5);
  }
  .icon-search[placeholder] {
    position: relative;
    padding-left: 30rpx;
    font-size: 24rpx;
  }
  .icon-scan {
    position: absolute;
    top: 10rpx;
    left: 15rpx;
    width: 40rpx;
    height: 40rpx;
    background-color: red;
    background: url("../../static//搜索.png") no-repeat;
    background-size: cover;
  }
}
// 自定义导航条结束

// 图片
.disease_banner {
  margin-top: 220rpx;
  width: 100%;
  height: 500rpx;
  // background-color: #bfa;
  image {
    width: 100%;
    height: 100%;
  }
}

// 作物类型开始
.crop_type {
  width: 100%;
  height: 100rpx;
  line-height: 100rpx;
  padding-left: 40rpx;
  background-color: #fff;
  box-shadow: 0rpx 0.5rpx 5rpx rgba(0, 0, 0, 0.2);
  margin-bottom: 20rpx;
}
// 作物类型结束

.kind {
  text-align: center;
}
// 疑似病害开始
.suspious_disease {
  width: 100%;
  // height: 1500rpx;
  line-height: 100rpx;
  box-sizing: border-box;
  padding: 0rpx 25rpx;
  background-color: #fff;
  box-shadow: 0rpx 0.5rpx 5rpx rgba(0, 0, 0, 0.2);
  margin-bottom: 50rpx;
  .suspious_title {
    margin-left: 35%;
  }
  .disease_img {
    width: 700rpx;
    height: 500rpx;
    // background-color: #bfa;
    image {
      width: 100%;
      height: 100%;
    }
  }
  .disease_descs {
    .title {
      font-weight: bold;
    }
    .desc_word {
      font-size: 24rpx;
      color: #b0b0b0;
    }
  }
}
.confirm {
  width: 100%;
  height: 100rpx;
  // background-color: #bfa;
  display: flex;
  justify-content: space-between;
  .confims {
    color: rgb(147, 241, 147);
    font-weight: bold;
  }
}
// 疑似病害结束

// 病害种类样式开始
.recommend_container {
  padding: 40rpx 30rpx;
  box-sizing: border-box;
  width: 700rpx;
  // height: 900rpx;
  background-color: #fff;
  margin-left: 25rpx;
  margin-top: 20rpx;
  border-radius: 30rpx;
  overflow: hidden;
  .show_img {
    width: 650rpx;
    height: 500rpx;
    // background-color: #bfa;
    border-radius: 60rpx;
    image {
      border-radius: 60rpx;
      width: 100%;
      height: 100%;
    }
  }
  .agriculture_desc {
    .desc_item {
      margin-bottom: 20rpx;
    }
    margin-top: 20rpx;
    .descs {
      font-size: 29rpx;
    }
    .desc {
      font-size: 25rpx;
      color: #adadad;
    }
  }
}
// 病害种类样式结束
</style>
